bitkeeper revision 1.62 (3e50cb4eg-PMPCWTPi41yy_fZzVykw)
authorkaf24@labyrinth.cl.cam.ac.uk <kaf24@labyrinth.cl.cam.ac.uk>
Mon, 17 Feb 2003 11:45:18 +0000 (11:45 +0000)
committerkaf24@labyrinth.cl.cam.ac.uk <kaf24@labyrinth.cl.cam.ac.uk>
Mon, 17 Feb 2003 11:45:18 +0000 (11:45 +0000)
page.h, traps.c:
  Improve BUG tracing. We now get registers + stack.

xen-2.4.16/arch/i386/traps.c
xen-2.4.16/include/asm-i386/page.h

index f7d18610a074d1cf938b03434a3d2a6fdc3869e1..8c71f78542435705fd38439feb6c7b4f0467f6f3 100644 (file)
@@ -119,6 +119,8 @@ void show_stack(unsigned long * esp)
     if(esp==NULL)
         esp=(unsigned long*)&esp;
 
+    printk("Stack trace from ESP=%p:\n", esp);
+
     stack = esp;
     for(i=0; i < kstack_depth_to_print; i++) {
         if (((long) stack & (THREAD_SIZE-1)) == 0)
@@ -128,7 +130,7 @@ void show_stack(unsigned long * esp)
         printk("%08lx ", *stack++);
     }
     printk("\n");
-    show_trace(esp);
+    //show_trace(esp);
 }
 
 void show_registers(struct pt_regs *regs)
@@ -152,6 +154,8 @@ void show_registers(struct pt_regs *regs)
            regs->esi, regs->edi, regs->ebp, esp);
     printk("ds: %04x   es: %04x   ss: %04x\n",
            regs->xds & 0xffff, regs->xes & 0xffff, ss);
+
+    show_stack(&regs->esp);
 }      
 
 
index 2929d7e6b75426716c9147c6afe1f5b0fc3e00f0..63b5c73afd7b84c2b27f92ce27b60735574cd8f5 100644 (file)
@@ -3,16 +3,10 @@
 
 
 #ifndef __ASSEMBLY__
-#ifdef CONFIG_DEBUG_BUGVERBOSE
-extern void do_BUG(const char *file, int line);
 #define BUG() do {                                     \
-       do_BUG(__FILE__, __LINE__);                     \
+       printk("BUG at %s:%d\n", __FILE__, __LINE__);   \
        __asm__ __volatile__("ud2");                    \
 } while (0)
-#else
-#include <xeno/lib.h>
-#define BUG() (panic("BUG at %s:%d\n", __FILE__, __LINE__))
-#endif
 #endif /* __ASSEMBLY__ */